package cn.ztr.ymcc.feign;

import cn.ztr.ymcc.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-course",fallbackFactory = CourseUserLearnFeignImpl.class)
public interface CourseUserLearnFeign {

    /**
     * 根据登录id和课程id
     * 查询用户购买课程记录
     * @param loginId
     * @param courseId
     * @return
     */
    @GetMapping("/courseUserLearn/getLearnByLoginIdAndCourseId/{loginId}/{courseId}}")
    public JsonResult getLearnByLoginIdAndCourseId(@PathVariable("loginId")Long loginId, @PathVariable("courseId")Long courseId);
}
